![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Heap allocator implementation. More...
#include <heap_allocator.h>
Public Member Functions | |
virtual void * | allocate (size_t size) |
Allocate memory. More... | |
virtual void | deallocate (void *) |
Deallocate previously allocated memory. More... | |
size_t | num_allocations () const |
Get number of allocated blocks. More... | |
![]() | |
virtual void * | allocate (size_t size)=0 |
Allocate memory. More... | |
virtual void | deallocate (void *)=0 |
Deallocate previously allocated memory. More... | |
template<class T > | |
void | destroy (T &object) |
Destroy object and deallocate its memory. More... | |
Heap allocator implementation.
Uses global operator new[] and operator delete[].
The memory is always maximum aligned. Thread-safe.
Definition at line 27 of file heap_allocator.h.
|
virtual |
Allocate memory.
Implements roc::core::IAllocator.
|
virtual |
Deallocate previously allocated memory.
Implements roc::core::IAllocator.
size_t roc::core::HeapAllocator::num_allocations | ( | ) | const |
Get number of allocated blocks.